//
//  NetRequest+UserAPI.h
//  AppleMarket
//
//  Created by yangy on 23/10/2018.
//  Copyright © 2018 szgsy. All rights reserved.
//

#import "NetRequest.h"

NS_ASSUME_NONNULL_BEGIN

@interface NetRequest (UserAPI)

/**
 登录
 
 @param account 账户
 @param password  登录密码
 @param codeKey 图形验证码Key
 @param verifyCode 手机/邮箱 验证码
 @param imageCode 图形验证码
 */
+ (void) request_DoLoginWithAccount:(NSString*) account
                           password:(NSString*) password
                          imageCode:(NSString*) imageCode
                       imageCodeKey:(NSString*) codeKey
                    completeHandler:(void (^)(id responseObj)) completeHandler
                               fail:(void (^)(NSError *error)) failHandler;


/**
 检查h账户是否存在

 @param account 账户
 */
+ (void) request_CheckForAccount:(NSString*) account
                 completeHandler:(void (^)(id responseObj)) completeHandler
                            fail:(void (^)(NSError *error)) failHandler;


/**
 获取登录安全策略

 @param account 账户
 */
+ (void) request_loginStrategy:(NSString*) account
                 completeHandler:(void (^)(id responseObj)) completeHandler
                            fail:(void (^)(NSError *error)) failHandler;

/**
 注册账号

 @param account 账号
 @param vCode 验证码
 @param agree 同意用户协议
 @param pwd 密码
 @param imgCode 图形验证码
 @param key 图形验证码key
 */
+ (void) request_registerAccount:(NSString*) account
                      verifyCode:(NSString*) vCode
                           agree:(BOOL) agree
                        password:(NSString*) pwd
                         imgCode:(NSString*) imgCode
                          imgKey:(NSString*) key
               completeHandler:(void (^)(id responseObj)) completeHandler
                          fail:(void (^)(NSError *error)) failHandler;


/**
 忘记密码

 @param account 账号
 @param vCode 验证码
 @param pwd 密码
 @param imgCode 图形验证码
 @param key 图形验证码key
 */
+ (void) request_forgetAccount:(NSString*) account
                      verifyCode:(NSString*) vCode
                        password:(NSString*) pwd
                         imgCode:(NSString*) imgCode
                          imgKey:(NSString*) key
                 completeHandler:(void (^)(id responseObj)) completeHandler
                            fail:(void (^)(NSError *error)) failHandler;
/**
 退出登录
 */
+ (void) request_loginoutWithCompleteHandler:(void (^)(id responseObj)) completeHandler
                                        fail:(void (^)(NSError *error)) failHandler;
@end

NS_ASSUME_NONNULL_END
